package org.springblade.modules.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
    * 楼盘信息
    */
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "blade_building")
public class Building extends TenantEntity {

	private static final long serialVersionUID = 1L;

    /**
     * 根节点id,当为根节点时为0
     */
    @TableField(value = "root_id")
    private Long rootId;

    /**
     * 父节点id,当为根节点时为0
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 楼盘名称
     */
    @TableField(value = "`name`")
    private String name;

	/**
	 * 类型 对应字典表dict_key
	 */
	@TableField(value = "`type`")
    private String type;

    /**
     * 物业名称
     */
    @TableField(value = "property_name")
    private String propertyName;

    /**
     * 省
     */
    @TableField(value = "province_name")
    private String provinceName;

    /**
     * 省code
     */
    @TableField(value = "province_code")
    private String provinceCode;

    /**
     * 市
     */
    @TableField(value = "city_name")
    private String cityName;

    /**
     * 市code
     */
    @TableField(value = "city_code")
    private String cityCode;

    /**
     * 区
     */
    @TableField(value = "ad_name")
    private String adName;

    /**
     * 区code
     */
    @TableField(value = "ad_code")
    private String adCode;

    /**
     * poiId
     */
    @TableField(value = "poi_id")
    private String poiId;

    /**
     * 详细地址
     */
    @TableField(value = "address")
    private String address;

	/**
	 * 定位地址
	 */
	@TableField(value = "location_address")
	private String locationAddress;

    /**
     * 经度
     */
    @TableField(value = "longitude")
    private BigDecimal longitude;

    /**
     * 纬度
     */
    @TableField(value = "latitude")
    private BigDecimal latitude;

    /**
     * 入驻时间
     */
    @TableField(value = "enter_time")
    private Date enterTime;

    /**
     * 自定义单位 例如 栋，座
     */
    @TableField(value = "block_name")
    private String blockName;

    /**
     * 自定义单位 例如 单元
     */
    @TableField(value = "unit_name")
    private String unitName;

	/**
	 * 来源类型 0-平台, 1-维保租户, 2-物业租户
	 */
	@TableField(value = "source_type")
	private Integer sourceType;

	/**
	 * 创建租户id
	 */
	@TableField(value = "source_tenant_id")
	private String sourceTenantId;

	/**
	 * 创建租户名称
	 */
	@TableField(value = "source_tenant_name")
	private String sourceTenantName;

	@TableField(value = "zh_code")
	@ApiModelProperty("中文编码")
	private String zhCode;

	/**
	 * 创建用户名称
	 */
	@TableField(value = "source_user_name")
	private String sourceUserName;

	@TableField(exist = false)
	private Integer elevatorCounts;

	@TableField(exist = false)
	private String groupName;

	@TableField(exist = false)
	private Long groupIds;

	@TableField(exist = false)
	private List<Long> buildingIds;


	/**
	 * 联系人名称
	 */
	@TableField(exist = false)
	private String userName;

	/**
	 * 手机号码
	 */
	@TableField(exist = false)
	private String phone;

	@ApiModelProperty("对接商务用户id")
	private Long businessUserId;

	@ApiModelProperty("对接商务用户名称")
	@TableField(exist = false)
	private String businessUserName;

	@ApiModelProperty("性别")
	private Integer genderStatus;
}
